import { PageContainer } from '@ant-design/pro-components';
import { Card } from 'antd';
import React from 'react';
import style from './Welcome.less';
import imgUrl from '../../public/welcome.png';

const Welcome: React.FC = () => {
  const loginTime = localStorage.getItem('loginTime');
  const loginInfo: any = JSON.parse(localStorage.getItem('userInfo') as any);

  return (
    <PageContainer>
      <Card className={style.cardContainer}>
        <div className={style.greeting}>
          <div className={style.hello}>欢迎 {loginInfo?.name} ，进入九五业务后台</div>
          <div className={style.loginTime}>
            您上次登录是在
            <span>{loginTime}</span>
            {/* <span>2023/2/18 20:00</span> */}
          </div>
        </div>
        <div className={style.container}>
          <div
            className={style.bg}
            style={{
              backgroundImage: `url(${imgUrl})`,
            }}
          />
        </div>
      </Card>
    </PageContainer>
  );
};
export default Welcome;
